package cn.xlbweb.sso.utils;

import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;

/**
 * @author: bobi
 * @date: 2019-03-24 20:00
 * @description:
 */
public class HttpUtil {

    public static void sendHttpRequest(String httpURL, String jesssionId) {
        try {
            URL url = new URL(httpURL);
            HttpURLConnection conn = (HttpURLConnection) url.openConnection();
            conn.setRequestMethod("GET");
            conn.setDoOutput(true);
            conn.addRequestProperty("Cookie", "JSESSIONID=" + jesssionId);
            conn.connect();
            conn.getInputStream();
            conn.disconnect();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
